package com.shop.core;

import java.util.List;

/**
 * 订单类型:分类层次未定,树形结构
 * @author yuxiaowei
 *
 */
public class GoodsType {
	
	private String id;
	private String name;
	private GoodsType parent;//父类别
	private List<GoodsType> childtypes;//子分类
	
	public GoodsType getParent() {
		return parent;
	}

	public void setParent(GoodsType parent) {
		this.parent = parent;
	}

	public List<GoodsType> getChildtypes() {
		return childtypes;
	}

	public void setChildtypes(List<GoodsType> childtypes) {
		this.childtypes = childtypes;
	}

	public GoodsType(String id,GoodsType parent,String  name){
		this.id=id;
		this.parent=parent;
		this.name=name;
	}
	
	//@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "[id="+id+",parent="+parent+",name="+name+"]";
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
}
